[Enhancement✨] Add buyer_id_ref method for MessageTrait#6616
Conversation
Add buyer_id_ref() method that returns Option<&CheetahString> instead of cloning, consistent with existing _ref methods (tags_ref, get_keys_ref, user_property_ref). Closes mxsm#6588
|
🔊@slegarraga 🚀Thanks for your contribution🎉! 💡CodeRabbit(AI) will review your code first🔥! Note 🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughA new method Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6616 +/- ##
==========================================
- Coverage 41.52% 41.34% -0.19%
==========================================
Files 961 963 +2
Lines 134645 135226 +581
==========================================
- Hits 55909 55906 -3
- Misses 78736 79320 +584 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rocketmq-rust-bot
left a comment
There was a problem hiding this comment.
LGTM - All CI checks passed ✅
Motivation
Closes #6588
Modification
Added
buyer_id_ref()method toMessageTraitthat returnsOption<&CheetahString>instead of cloning. This is consistent with existing_refmethods liketags_ref(),get_keys_ref(), anduser_property_ref().Result
Zero-copy access to buyer ID property, avoiding unnecessary string cloning.
Summary by CodeRabbit